<?php
class Admin_Models_ActionModel extends Zend_Db_Table_Abstract{
	protected $_name="action";
	protected $_primary="id";
	
	public function getActionList(){
                $model_controller = new Admin_Models_ControllerModel();
		$controller_list = $model_controller->getControllerList();
		$action_list = array();
		$db = Zend_Registry::get('connectDB');
		foreach ($controller_list as $controller) {
			$mySql = $db->select()
						->from('action')
						->where('controller_id = ?',$controller['id']);
			$action_list[$controller['name']] = $db->fetchAll($mySql);
		}
		return $action_list;
	}
}